<?php include "top.php"; ?>
<?php
		 $nid=make_safe($_GET["nid"]); 
		 if($nid==""){$nid=1;}
		 
		if($nid==1){$nidname="公司樣本";}
		 if($nid==2){$nidname="禮服";}
		 if($nid==3){$nidname="客戶";}
		 
		 
		?>

      <div id="top-3">
        <div id="m-text-1">
        <table border="0" cellpadding="0" cellspacing="0" class="tab-5">
   <tr>
     <td valign="top"><div class="tab-5-tit">主功能列表</div>
     <div class="m-text-2_btn"><a href="category.php?nid=<?php echo $nid;?>">作品分類管理</a></div>
     <div class="m-text-2_btn"><a href="target.php?nid=<?php echo $nid;?>" >標簽管理</a></div>
     <div class="tab-5-tit">相簿管理</div>
      
	 
	 <?php
  $n=1;

  $sql="select * from product_type_big where nid='$nid' order by orderid  ";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
     <div class="m-text-2_btn"><a href="working.php?nid=<?php echo $nid;?>&BigClassName=<?php echo urlencode($row->BigClassName);?>"><?php echo $row->BigClassName;?></a></div>
     <?php }?>
	 
       </td>
   </tr>
   </table>
        </div>
		
		

		
		
		
		
		
        <div id="m-text-2_banner">
          <ul>
            
            <li>/ </li>
            <li><a href="category_add.php?nid=<?php echo $nid;?>">新增</a></li>
            <li><?php echo $nidname;?>作品分類管理</li>
			
			
			
			
			
          </ul>
        </div
		
		
		
		
		
		
		
		
		
		><div id="m-text-2">
		
		
		
		
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
          <tr>
            <td class="m-text-2-con3">選擇</td>
            <td class="m-text-2-con3">類別</td>
            <td class="m-text-2-con3">排序</td>
			<td class="m-text-2-con3">操作</td>
			<td class="m-text-2-con3">刪除</td>
            </tr>
</table>






<script language="javascript"> 



function Checker(){ 


  
// document.write(document.form2.id.length)
  
  
  
   //if(document.form2.yaoyun.value==""){document.write("您按了确认！") }
   
   //  document.write("您按了确认！") 

   

document.form2.items.value = "";         //设置隐藏域的值为空
if ( !document.form2.id.length ) {      //只有一个复选框，form2.item.length = undefined



	if ( document.form2.id.checked ){
	document.form2.items.value = document.form2.id.value; 
	
	
	} 
}else { 

	var temp="";
	for ( i = 0 ; i < document.form2.id.length ; i++ ){ 
		if ( document.form2.id[i].checked ){       //复选框中有选中的框 
			temp=temp+document.form2.id[i].value+",";   //将数组中的元素使用","分隔
		}	 

	} 
	temp=temp.substring(0,temp.length-1);     //去除字符串末尾多余的","
	document.form2.items.value = temp;    //将变量赋值给隐藏域
	
//	document.write(document.form2.items.value)
} 
} 
</script>  <script language="javascript">
function CheckAll(elementsA,elementsB)
{
	var len = elementsA;
	if(len.length > 0)
	{
		for(i=0;i<len.length;i++)
		{
			elementsA[i].checked = true;
		}
		if(elementsB.checked ==false)
		{
			for(j=0;j<len.length;j++)
			{
				elementsA[j].checked = false;
			}
		}
	}
	else
	{
		len.checked = true;
		if(elementsB.checked == false)
		{
			len.checked = false;
		}
	}
}
</script>



<SCRIPT language=javascript>

function ConfirmDel()
{
   if(confirm("確定要刪除選擇的訊息嗎？一旦刪除將不能恢複！"))
     return true;
   else
     return false;
	 
}

</SCRIPT>





<form name="form2" method="Post" action="product_type_big_del.php" onSubmit="Checker()">
<?php 
		 
   if($page){
    $page_size=100;
    $sql="select count(*) as total from product_type_big where nid='$nid' ";
	$result=mysql_query($sql);
    $message_count=mysql_result($result,0,"total");
    $page_count=ceil($message_count/$page_size);	
    $offset=($page-1)*$page_size;			 
    $sql="select * from product_type_big where nid='$nid' order by orderid ,id desc  limit $offset, $page_size";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
  <tr>
    <td class="m-text-2-con3"><input name="id" type="checkbox" id="id" value="<?php echo $row->id;?>">
      </td>
    <td class="m-text-2-con3"><?php echo $row->BigClassName;?></td>
    <td class="m-text-2-con3">
      <?php echo $row->orderid;?></td>
	  <td class="m-text-2-con3">
        <a style="color:#000000" href="category_type_xiugai.php?id=<?php echo $row->id;?>&nid=<?php echo $row->nid;?>">修改</a></td>
		<td class="m-text-2-con3">
        <a style="color:#000000" href="product_type_big_del.php?id=<?php echo $row->id;?>&nid=<?php echo $row->nid;?>&action=del">刪除</a></td>
  </tr>
</table>
<?php }}?>


</br>
<table border="0" cellpadding="0" cellspacing="0" class="m-text-2-con">
          <tr> <input type="hidden" name="items" value="<?php echo $item; ?>">
            <td width="250" height="30"><input name="chk_all" type="checkbox" id="chk_all" value="checkbox" onClick="CheckAll(this.form.id,this.form.chk_all)">
              選擇本頁顯示的所有訊息</td>
            <td><input name="submit" type='submit' value='刪除選擇的訊息' onClick="return ConfirmDel();"> 
             </td>
          </tr>
        </table>
</form>


        </div>
      </div>
    </div>
  </div>
</div>
<div id="botton"><div id="copyright"><table border="0" cellpadding="0" cellspacing="0" class="copy">
  <tr>
    <td>© COPYRIGHTS 2010 INC. APARTMENT STUDIO All rights reserved.</td>
  </tr>
</table>
</div></div>
</body>
</html>